import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      component: resolve => require(['@/components/common/Login.vue'], resolve)
    },
    {
      path: '/main',
      component: resolve => require(['@/components/common/Main.vue'], resolve),
      children: [
        {
          path: '/',
          component: resolve => require(['@/components/demo/Home.vue'],resolve)
        },
        {
          path: '/demo01',
          component: resolve => require(['@/components/demo/Demo01.vue'],resolve)
        },
        {
          path: '/demo02',
          component: resolve => require(['@/components/demo/Demo02.vue'],resolve)
        },
        {
          path: '/imgUpload',
          component: resolve => require(['@/components/demo/ImgUpload.vue'],resolve)
        },
        {
          path: '/newsAdd',
          component: resolve => require(['@/components/news/NewsAdd.vue'],resolve)
        },
        {
          path: '/newsList',
          component: resolve => require(['@/components/news/NewsList.vue'],resolve)
        },
        {
          path: '/menuAdd',
          component: resolve => require(['@/components/system/MenuAdd.vue'],resolve)
        },
        {
          path: '/sys-menu',
          component: resolve => require(['@/components/bone-system/Menu.vue'],resolve)
        }
      ]
    },
    
    
  ]
})
